package com.lai.laiojcodesandbox.enums;

import lombok.Getter;

/**
 * 枚举类
 * Java、python、c、c++ 语言 代码沙箱相关信息
 */
@Getter
public enum LanguageEnums {

    DEFAULT_INFO("Default","Main.java","openjdk:8-alpine"),

    JAVA_INFO("java","Main.java","openjdk:8-alpine"),

    PYTHON_INFO("python","Main.py","python:3.8-slim"),

    C_INFO("c","Main.c","c-image");

    private final String language;

    /**
     * 保存文件后缀名
     */
    private final String className;

    private final String images;

    LanguageEnums(String language,String className, String images) {
        this.language = language;
        this.className = className;
        this.images = images;
    }

    /**
     * 获取所有语言对应的镜像名称
     * @return 镜像名称集合
     */
    public static String[] getImagesByLanguage(){
        return new String[]{
                JAVA_INFO.getImages(),
//                PYTHON_INFO.getImages(),
//                C_INFO.getImages()
        };

    }

}
